//
//  MineWithdrawModel.swift
//  MT
//
//  Created by M on 2020/2/3.
//  Copyright © 2020 张强. All rights reserved.
//

import UIKit
import ObjectMapper

class MineWithdrawResponseModel: Mappable {
    
    var code: Int?
    
    var result: MineWithdrawModel?
    
    var resultT: [MineWithdrawModel]?
    
    var message: String?
    
    required init?(map: Map) {
        
    }
    
    open func mapping(map: Map) {
        code            <- map["code"]
        result          <- map["result"]
        message         <- map["message"]
        resultT         <- map["result"]
    }
    
}

class MineWithdrawModel: Mappable {

    var rmbAmount: Int = 0
    
    var ticketAmount: Int = 0
    
    var money: Int = 0
    
    ///实际可提现金额
    var actualWithDrawMoney: Int = 0
    
    ///最高可提现金额
    var enableMoney: Int = 0
    ///实名状态0已提交，1认证成功，2认证失败
    var status: Int = 0
    ///已提现金额
    var withDrawMoney: Int = 0
    ///提现比例
    var withdrawRate: Int = 0
    ///支付宝账号绑定状态
    var aliStatus: Bool = false
    
    ///银行卡绑定状态
    var bankStatus: Bool = false
    
    var aliAccount: WithdrawAccountModel?
    
    var bankAccount: WithdrawAccountModel?
    
    var isSelected: Bool = false
    
    
    required init?(map: Map) {
        
    }
    
    open func mapping(map: Map) {
        rmbAmount               <- map["rmbAmount"]
        ticketAmount            <- map["ticketAmount"]
        money                   <- map["money"]
        actualWithDrawMoney           <- map["actualWithDrawMoney"]
        enableMoney                   <- map["enableMoney"]
        status                        <- map["status"]
        withDrawMoney                 <- map["withDrawMoney"]
        withdrawRate                  <- map["withdrawRate"]
        aliStatus                     <- map["aliStatus"]
        bankStatus                    <- map["bankStatus"]
        aliAccount                    <- map["aliAccount"]
        bankAccount                    <- map["bankAccount"]
    }
    
}

class WithdrawAccountModel: Mappable {

    var account: String?
    
    var bankName: String?
    
    //1支付宝，2银行
    var typeId: Int = 0
    
    var userName: String?
    
    required init?(map: Map) {
        
    }
    
    open func mapping(map: Map) {
        account               <- map["account"]
        bankName            <- map["bankName"]
        typeId                   <- map["typeId"]
        userName           <- map["userName"]
    }
    
}
